<!--{template header}-->
<link href="/template/default/center.css" rel="stylesheet" type="text/css"/>


<div class="center">
    <div class="center_left_menu">
        <ul>
            <li class="top"><a href="/cp.php?ac=profile">个人资料</a></li>
            <li><a href="/cp.php?ac=avatar">修改头像</a></li>
            <li><a href="/cp.php?ac=password">修改密码</a></li>
            <li><a href="/cp.php?ac=publish">发布活动</a></li>
            <li><a href="">已参加活动</a></li>
            <li><a href="">个人推广数</a></li>
            <li><a href="">我的分享</a></li>
            <li><a href="">我的代言</a></li>
            <li><a href="">我的小组</a></li>
            <li><a href="/contribute.php">我的稿件</a></li>
            <li><a href="/cp.php?ac=follow">关注&粉丝</a></li>
            <li><a href="/space.php?do=udisk" class="on">网盘</a></li>
            <li><a href="/admincp.php">高级管理</a></li>
        </ul>
    </div>
    
    
	<div class="center_right_content" style="height:auto">
        
        

<!--{if $_GET['op']=='edit' || $_GET['op']=='editpic'}-->

<div class="top_menu">
	<ul>
		<li><a<!--{if $_GET['op']=='edit'}--> class="on"<!--{/if}--> href="cp.php?ac=udisk&op=edit&albumid=$albumid">编辑网盘信息</a></li>
		<li><a<!--{if $_GET['op']=='editpic'}--> class="on"<!--{/if}--> href="cp.php?ac=udisk&op=editpic&albumid=$albumid">编辑文件</a></li>
		<li><a$actives[js] href="cp.php?ac=uploadudisk&albumid=$albumid">普通上传</a></li>
		<li><a href="space.php?uid=$space[uid]&do=udisk&view=me">返回我的网盘</a></li>
	</ul>
</div>
<!--{/if}-->

<!--{if $_GET['op'] == 'edit'}-->

<script type="text/javascript">
	function passwordShow(value) {
		if(value==4) {
			$('span_password').style.display = '';
			$('tb_selectgroup').style.display = 'none';
		} else if(value==2) {
			$('span_password').style.display = 'none';
			$('tb_selectgroup').style.display = '';
		} else {
			$('span_password').style.display = 'none';
			$('tb_selectgroup').style.display = 'none';
		}
	}
	function getgroup(gid) {
		if(gid) {
			var x = new Ajax();
			x.get('cp.php?ac=privacy&op=getgroup&gid='+gid, function(s){
				$('target_names').innerHTML += s;
			});
		}
	}
</script>

<div class="info_list c_form2">
<form method="post" id="theform" name="theform" action="cp.php?ac=udisk&op=edit&albumid=$albumid" class="c_form">
<table cellspacing="0" cellpadding="0" class="formtable">
	<tr>
		<th width="80"><label for="albumname">目录名</label></th>
		<td><input type="text" id="albumname" name="albumname" value="$album[albumname]" size="20" class="t_input" /></td>
	</tr>
	<tr>
		<th>隐私设置</th>
		<td>
			<select name="friend" onchange="passwordShow(this.value);">
				<option value="0"$friendarr[0]>全站用户可见</option>
				<option value="1"$friendarr[1]>全好友可见</option>
				<option value="2"$friendarr[2]>仅指定的好友可见</option>
				<option value="3"$friendarr[3]>仅自己可见</option>
				<option value="4"$friendarr[4]>凭密码查看</option>
			</select>
			<span id="span_password" style="$passwordstyle">密码:<input type="text" name="password" value="$album[password]" size="10"></span>
		</td>
	</tr>
	<tbody id="tb_selectgroup" style="$selectgroupstyle">
	<tr>
		<th>指定好友</th>
		<td><select name="selectgroup" onchange="getgroup(this.value);">
			<option value="">从好友组选择好友</option>
			<!--{loop $groups $key $value}-->
			<option value="$key">$value</option>
			<!--{/loop}-->
			</select> 多次选择会累加到下面的好友名单</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td>
		<textarea name="target_names" id="target_names" style="width:85%;" rows="3">$album[target_names]</textarea>
		<br>(可以填写多个好友名，请用空格进行分割)</td>
	</tr>
	</tbody>
	<tr>
		<th>&nbsp;</th>
		<td>
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="editsubmit" value="true" />
		<button name="submit" type="submit" class="submit" value="true">确定</button>&nbsp;
		</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td><a href="cp.php?ac=udisk&op=delete&albumid=$album[albumid]" id="album_delete_$album[albumid]" onclick="ajaxmenu(event, this.id, 99999)">删除目录</a></td>
	</tr>

</table>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>


<!--{elseif $_GET['op'] == 'editpic'}-->

<div class="h_status">
<!--{if $album[albumname]}-->
$album[albumname]<span class="pipe">|</span><a href="space.php?do=udisk&id=$albumid">返回目录</a>
<!--{else}-->
<a href="space.php?do=album&id=-1">返回默认目录</a>
<!--{/if}-->
</div>


	<div class="info_list">
		<form method="post" id="theform" name="theform" action="cp.php?ac=udisk&op=editpic&albumid=$albumid">
		<!--{if $list}-->
		<table cellspacing="6" cellpadding="0">
			<!--{loop $list $value}-->
			<tr>
				<td class="album">
					<table cellspacing="0" cellpadding="0">
						<tr>
							<td width="20"><input type="checkbox" name="ids[{$value[picid]}]" value="{$value[picid]}"></td>
							<td align="right" width="30"><a href="space.php?uid=$value[uid]&do=udisk&picid=$value[picid]&goto=downfiles" style="margin-left:10px;float:left;" target="_blank"><img src="/template/default/image/file/<!--{$value['fileext']}-->.gif" alt="$value[albumname]" border="0" /></a></td>
							<td align="left" width="300"><a href="space.php?uid=$value[uid]&do=udisk&picid=$value[picid]&goto=downfiles" style="margin-left:10px;float:left;" target="_blank"><b>$value[filename]</b></a></td>
							<td><textarea name="title[{$value[picid]}]" rows="3" cols="60">$value[title]</textarea></td>
						</tr>
					</table>
				</td>
			</tr>
			<!--{/loop}-->
			<tr>
				<td>
					<input type="checkbox" id="chkall" name="chkall" onclick="checkAll(this.form, 'ids')"><label for="chkall"> 全选</label>
					<input type="submit" name="editpicsubmit" value="更新" class="submit" onclick="this.form.action+='&subop=update';" style="margin-left: 108px;">
					<input type="submit" name="editpicsubmit" value="删除" class="submit" onclick="this.form.action+='&subop=delete';return ischeck('theform', 'ids')">
					<input type="submit" name="editpicsubmit" value="转移到:" class="submit" onclick="this.form.action+='&subop=move';return ischeck('theform', 'ids')">
					<select name="newalbumid">
					<!--{loop $albumlist $key $value}-->
					<!--{if $albumid != $value[albumid]}--><option value="$value[albumid]">$value[albumname]</option><!--{/if}-->
					<!--{/loop}-->
					<!--{if $albumid>0}--><option value="0">默认目录</option><!--{/if}-->
					</select>
				</td>
			</tr>
		</table>
		<!--{else}-->
		<div class="article l_text">该目录下还没有图片，你可以<a href="cp.php?ac=uploadudisk&albumid=$albumid">上传新文件</a></div>
		<!--{/if}-->
		<input type="hidden" name="start" value="$start" />
		<input type="hidden" name="editpicsubmit" value="true" />
		<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
		</form>
	</div>
	<div class="page">$multi[html]</div>


<!--{elseif $_GET['op'] == 'delete'}-->

<div <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form method="post" id="theform" name="theform" action="cp.php?ac=udisk&op=delete&albumid=$albumid">
	<h1>确定删除目录吗？</h1>
	<p class="btn_line">
		目录中的文件: 
		<select name="moveto">
			<option value="-1">彻底删除</option>
			<option value="0">转移到 默认目录</option>
			<!--{loop $albums $value}-->
			<option value="$value[albumid]">转移到 $value[albumname]</option>
			<!--{/loop}-->
		</select>
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="deletesubmit" value="true" />
		<button name="submit" type="submit" class="submit" value="true">确定</button>&nbsp;
		<!--{if $_SGLOBAL[inajax]}--><button name="cancel" type="button" class="button" onclick="hideMenu()">取消</button><!--{/if}-->
	</p>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{elseif $_GET['op'] == 'deletefile'}-->

<div <!--{if !$_SGLOBAL[inajax]}-->class="inpage"<!--{/if}-->>
<form method="post" id="theform" name="theform" action="cp.php?ac=udisk&op=deletefile&albumid=$albumid&fileid=$fileid">
	<h1>确定删除文件吗？</h1>	
		<input type="hidden" name="refer" value="$_SGLOBAL[refer]" />
		<input type="hidden" name="deletesubmit" value="true" />
		<button name="submit" type="submit" class="submit" value="true">确定</button>&nbsp;
		<!--{if $_SGLOBAL[inajax]}--><button name="cancel" type="button" class="button" onclick="hideMenu()">取消</button><!--{/if}-->
	</p>
<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
</form>
</div>

<!--{/if}-->

</div>
</div>

<!--{template footer}-->